// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: donggu

#pragma once

#include <experimental/filesystem>
#include <utility>

namespace coin2::app {
class DriverConfig;
}

namespace coin2::base {
class IntervalConfig;
}

namespace coin2::exchange::feed {
class WebsocketConfig;
class ArchiveConfig;
}  // namespace coin2::exchange::feed

namespace coin2::base::config {

std::pair<int64_t, int64_t> GetEnclosingInterval(const coin2::app::DriverConfig& config);
std::pair<int64_t, int64_t> FromIntervalConfig(const coin2::base::IntervalConfig& config);
coin2::app::DriverConfig DriverConfigFromJson(const std::experimental::filesystem::path& path);
void ValidateWebsocketConfig(const coin2::exchange::feed::WebsocketConfig& config);
void ValidateArchiveConfig(const coin2::exchange::feed::ArchiveConfig& config);

}  // namespace coin2::base::config
